<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>jsonp</title>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue-resource/1.5.1/vue-resource.js"></script>
</head>
<body>
<div id="case9-demo1">
    <button v-on:click="sendJsonp">发送jsonp请求</button>
</div>
</body>
<script type="text/javascript">
    var case9Demo=new Vue({
        el:"#case9-demo1",
        methods:{
            sendJsonp:function () {
                //发送jsonp请求
                this.$http.jsonp("https://sug.so.360.cn/suggest",{
                    params:{
                        word:"5"
                    }
                })
                .then((response)=> {
                    console.log(response.body.result);
                })
            }
        }
    })
</script>
</html>